﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;

namespace MusicSearch
{
    public partial class FormPlayer : Form
    {
        private JObject music;
        public FormPlayer(JObject music)
        {
            this.music = music;
            InitializeComponent();
            this.Text = (string)music["songName"] + " - " + (string)music["artistName"];
        }

        private void Form3_Load(object sender, EventArgs e)
        {
            try
            {
                this.axWindowsMediaPlayer1.URL = (string)this.music["songLink"];
            }catch(Exception ex){
                this.toolStripStatusLabel1.Text = ex.Message;
            }
        }
    }
}
